#include<stdio.h>
#include"process.h"
#include<stdlib.h>
#include<unistd.h>
#include<time.h>
double total =2024;
double speed = 10;
void download()
{
   double current=0.0;int count=0;
   while(current<=total&&count<2)
   {
     double newsp=speed+rand()%5;
     //newsp*=0.1;
     usleep(50000);
     process(current,total);
     current+=newsp;
     if(current>total)
     {
       current=total;
       count++;
     }
    
   }
   printf("\r\n");

}
int main()
{
  srand(time(NULL));

  download();
  return 0;
}
